{extend name='admin@main'}

{block name="button"}
<button data-modal='{:url("add")}' data-title="添加" class='layui-btn layui-btn-sm layui-btn-primary'>添加</button>
<button data-action='{:url("del")}' data-rule="id#{key}" data-confirm="确定要删除这些吗？" class='layui-btn layui-btn-sm layui-btn-primary'>删除</button>

{/block}

{block name="content"}
<table class="layui-table" lay-skin="line">
<!--    <caption class="margin-bottom-10 text-left">{include file='school_class/index_search'}</caption>-->

    <!--{notempty name='list'}-->
    <thead>
    <tr>
        <th class='list-table-check-td think-checkbox'>
            <input data-auto-none data-check-target='.list-check-box' type='checkbox'>
        </th>
        <th class='text-center nowrap' >消息名称</th>
        <th class='text-center nowrap' >消息描述</th>
        <th class='text-center nowrap' >读取用户</th>
        <th class='text-center nowrap' >读取状态</th>
        <th class='text-center nowrap' >读取时间</th>
        <th class='text-center nowrap' >创建时间</th>
        <th class='text-center nowrap' >操作</th>
    </tr>
    </thead>
    <!--{/notempty}-->
    <tbody>
    <!--{foreach $list as $key=>$vo}-->
    <tr data-dbclick>
        <td class='list-table-check-td think-checkbox'><input class="list-check-box" value='{$vo.id}' type='checkbox'></td>
        <td class='text-center'>
            <div class="inline-block">
                {$vo.title|default='--'}
            </div>
        </td>
        <td class='text-center'>
            <div class="inline-block">
                {$vo.desc|default='--'}
            </div>
        </td>
        <td class='text-center'>
            <div class="inline-block">
                {$vo.user.realname|default='--'}
            </div>
        </td>
        <td class='text-center'>
            <div class="inline-block">
                {if $vo.read_state == '1'}
                已读
                {else}
                未读
                {/if}
            </div>
        </td>
        <td class='text-center'>
            <div class="inline-block">
                {$vo.read_at|default='--'}
            </div>
        </td>
        <td class='text-center nowrap'>
            {$vo.create_at|default='--'}
        </td>
        <td class='text-center nowrap'>
<!--            <a class="layui-btn layui-btn-sm layui-btn-normal" data-title="编辑" data-modal='{:url("edit")}?id={$vo.id}'>编 辑</a>-->
            <a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除数据吗?" data-action="{:url('del')}" data-value="id#{$vo.id}">删 除</a>
        </td>
    </tr>
    <!--{/foreach}-->
    </tbody>
</table>

{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}

<style>
    table.trim-bottom-border tr:last-child td {
        border: none !important;
    }
</style>

{/block}
